Warning about --python and --override-python-version deprecation#655
Merged
Warning about --python and --override-python-version deprecation#655
Conversation
☂️ Python Coverage
Overall Coverage
New FilesNo new covered files... Modified Files
|
Lytol
approved these changes
Apr 9, 2025
Contributor
Lytol
left a comment
There was a problem hiding this comment.
Wonderful! I noted a small copy edit to keep consistent with how we refer to Connect.
Co-authored-by: Brian Smith <brian.e.smith@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Intent
The intent is moving the user toward best practices of using a
.python-versionfile when a specific version of Python has to be used to deploy the project. That relies on a standard way to specific version requirements and allows the requirement to be packaged/committed with the project thus making deploys reproducible.--override-python-versionoption isn't needed anymore when.python-versionis supported and using it made the deploy unreproducible--pythonoption is confusing in itself, as it refers to the python interpreter used to runrsconnectand on latest connect versions (>=2025.03) it doesn't influence the interpreter used to run the content anymore. The fact that it previously did was practically a side effect. Deprecating it gives the user a suggestion for a reliable and predictable way to specify the python interpreter.As the
--pythonoption does no longer influence the interpreter in use itself, but it's only used to detect the environment requirements, I made #656 to change the name to something that better conveys its purpose in the future.Type of Change
Approach
Add a deprecation message without disabling the existing option.
This will start suggesting users to embrace the best practice and give them time to migrate.
In the future we will be able to drop the options as users migrated away from them.
Automated Tests
Two tests were added asserting the the deprecation messages are correctly emitted
Directions for Reviewers
Checklist